package com.jumi.microservice.stock.api;

import com.jumi.microservice.common.base.dto.ResponseResult;
import com.jumi.microservice.stock.api.dto.CommodityMaterialStockDTO;
import com.jumi.microservice.stock.api.dto.CommodityStockReleaseDTO;
import com.jumi.microservice.stock.dto.commodity.CommodityApplyDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Description:
 * @Param null
 * @Return {@link null}
 * @Throws
 * @Author Abel Yang
 * @Date 2020/8/27/027 9:49
 */
@RequestMapping("/supply/stock")
public interface IJmStockApi {

    /**
     * @Description: 根据供应链物料id查询物料库存
     * @Param materialIds
     * @Return {@link ResponseResult<List< CommodityMaterialStockDTO >>}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/8/28/028 9:20
     */
    @PostMapping("/getMaterialStockByMaterialIds")
    ResponseResult<List<CommodityMaterialStockDTO>> getMaterialStockByMaterialIds(@RequestBody List<Long> materialIds);

    /**
     * 商城申请添加库存
     *
     * @param applyRequest
     * @return
     * @Author ssk
     */
    @PostMapping("/addCommodityApply")
    ResponseResult addCommodityApply(@RequestBody CommodityApplyDTO applyRequest);

    /**
     * @Description: 商城物料库存释放
     * @Param commodityStockReleaseDTOS
     * @Param updateBy
     * @Return {@link ResponseResult}
     * @Throws
     * @Author Abel Yang
     * @Date 2020/10/19/019 15:50
     */
    @PostMapping("/commodityRelease")
    ResponseResult commodityStockRelease(@RequestParam("commodityStockReleaseDTOS") List<CommodityStockReleaseDTO> commodityStockReleaseDTOS, @RequestParam("updateBy") String updateBy);
}
